home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / exec / deletemsgport.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  74 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: deletemsgport.c,v 1.5 1996/10/24 15:50:47 aros Exp $
  4.     $Log: deletemsgport.c,v $
  5.     Revision 1.5  1996/10/24 15:50:47  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/08/13 13:56:00  digulla
  9.     Replaced AROS_LA by AROS_LHA
  10.     Replaced some AROS_LH*I by AROS_LH*
  11.     Sorted and added includes
  12.  
  13.     Revision 1.3  1996/08/01 17:41:09  digulla
  14.     Added standard header for all files
  15.  
  16.     Desc:
  17.     Lang: english
  18. */
  19. #include <exec/ports.h>
  20. #include <exec/execbase.h>
  21. #include <aros/libcall.h>
  22.  
  23. /*****************************************************************************
  24.  
  25.     NAME */
  26.     #include <clib/exec_protos.h>
  27.  
  28.     AROS_LH1(void, DeleteMsgPort,
  29.  
  30. /*  SYNOPSIS */
  31.     AROS_LHA(struct MsgPort *, port, A0),
  32.  
  33. /*  LOCATION */
  34.     struct ExecBase *, SysBase, 112, Exec)
  35.  
  36. /*  FUNCTION
  37.     Delete a messageport allocated with CreateMsgPort(). The signal bit
  38.     is freed and the memory is given back to the memory pool. Remaining
  39.     messages are not replied. It is safe to call this function with a
  40.     NULL pointer.
  41.  
  42.     INPUTS
  43.     port - Pointer to messageport structure.
  44.  
  45.     RESULT
  46.  
  47.     NOTES
  48.  
  49.     EXAMPLE
  50.  
  51.     BUGS
  52.  
  53.     SEE ALSO
  54.  
  55.     INTERNALS
  56.  
  57.     HISTORY
  58.  
  59. ******************************************************************************/
  60. {
  61.     AROS_LIBFUNC_INIT
  62.  
  63.     /* Only if there is something to free */
  64.     if(port!=NULL)
  65.     {
  66.     /* Free signal bit */
  67.     FreeSignal(port->mp_SigBit);
  68.  
  69.     /* And memory */
  70.     FreeMem(port,sizeof(struct MsgPort));
  71.     }
  72.     AROS_LIBFUNC_EXIT
  73. } /* DeleteMsgPort */
  74.